package entity;

/**
 * @BelongsProject:coder_parent
 * @BelongsPackage:entity
 * @Author:linchong
 * @CreateTime:2018-12-28 12:17
 * @Description: 控制返回结果对象
 */
public class Result {
    private  boolean flag;  //结果标识，是否成功
    private Integer code;   //返回码
    private String message; //返回信息
    private Object data;    //返回结果数据

    public Result() {
    }

    //构造方法赋值
    //增删改
    public Result(boolean flag, Integer code, String message) {
        this.flag = flag;
        this.code = code;
        this.message = message;
    }
    //查询数据


    public Result(boolean flag, Integer code, String message, Object data) {
        this.flag = flag;
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
